package com.ytjj.qmyx.admin.controller.bigdata;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.users.client.BigdataClient;
import com.ytjj.qmyx.users.model.bigdata.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/adsAppContent")
public class AdsAppContentController {

    @Autowired
    private BigdataClient bigdataClient;

    @PostMapping("/list")
    public CommonResult selectAdsAppContent(@RequestBody AdsAppContentDto adsAppContentDto) {
        return bigdataClient.selectAdsAppContent(adsAppContentDto);
    }

    @PostMapping("/homePageList")
    public CommonResult selectAdsHomePageAll(@RequestBody AdsHomePageDto adsHomePageDto) {
        return bigdataClient.selectAdsHomePageAll(adsHomePageDto);
    }

    @PostMapping("/selectAdsEvaluateDetailAll")
    public CommonResult selectAdsEvaluateDetailAll(@RequestBody AdsEvaluateDetailDto adsEvaluateDetailDto) {
        return bigdataClient.selectAdsEvaluateDetailAll(adsEvaluateDetailDto);
    }

    @PostMapping("/selectAdsAppContentSummaryAll")
    public CommonResult selectAdsAppContentSummaryAll(@RequestBody AdsAppContentSummaryDto adsAppContentSummaryDto) {
        return bigdataClient.selectAdsAppContentSummaryAll(adsAppContentSummaryDto);
    }

    @PostMapping("/selectAdsAppPostAll")
    public CommonResult selectAdsAppPostAll(@RequestBody AdsAppPostDto adsAppPostDto) {
        return CommonResult.success(bigdataClient.selectAdsAppPostAll(adsAppPostDto));
    }

    @PostMapping("/selectAdsAppRetentionAll")
    public CommonResult selectAdsAppRetentionAll(@RequestBody AdsAppRetentionDto adsAppRetentionDto) {
        return CommonResult.success(bigdataClient.selectAdsAppRetentionAll(adsAppRetentionDto));
    }

    @PostMapping("/selectAdsAppBehaviorAll")
    public CommonResult selectAdsAppBehaviorAll(@RequestBody AdsAppBehaviorDto adsAppBehaviorDto) {
        return CommonResult.success(bigdataClient.selectAdsAppBehaviorAll(adsAppBehaviorDto));
    }

    @PostMapping("/selectEvaluateDetailWeek")
    public CommonResult selectEvaluateDetailWeek(@RequestBody AdsEvaluateDetailWeekDto adsEvaluateDetailWeekDto) {
        return CommonResult.success(bigdataClient.selectEvaluateDetailWeek(adsEvaluateDetailWeekDto));
    }
}
